home *** CD-ROM | disk | FTP | other *** search
- /* random.h
- *************************************************************************/
-
- #include <math.h>
-
- double drand48(); /* 0 to 1 */
-
- long lrand48(); /* 0 to 2^31-1 */
-
- long mrand48(); /* -2^31 to 2^31-1 */
-
- #define RAN(num) ((int)floor(drand48()*(num)))
- #define PCT(num) ((drand48() * 100.0) < (num))
-